<script src="../media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="../media/system/js/core.js" type="text/javascript"></script>
<form action="index.php?top=page&option=com_frclub" method="post" name="adminForm" id="adminForm" class="adminform">
<!-- LEFT -->
 <?php echo $this->loadTemplate('search','default') ?>
 <!-- END LEFT -->
 
 <!-- CONTENT -->
 <div id="jm-content">
    <div class="cc title">
        <div class="id"><?php echo $this->info_ocba->OCBA_CODE; ?></div>
        <div class="cc-title">
            <p class="top"><?php echo  $this->info_ocba->OCBA_KANA; ?></p>
            <p class="bot"><?php echo $this->info_ocba->OCBA_NAME; ?><span class="float-right">【<?php echo $this->info_ocba->OCBA_SHOR; ?>】</span></p>
        </div>
    </div>
    <div class="clearfix"></div>
    <div class="menu-cc">
        <ul id="nav">
        
        <?php 
            foreach(bgData::getMenuDetailClub() as $key=>$item){
                $acctive = 'normal';
                if(JRequest::getVar('task') == $key){
                    $acctive = 'current';
                }
         ?>
            <li class="<?php echo $acctive; ?>"><a href="index.php?top=page&option=com_frclub&task=<?php echo $key; ?>&id=<?php echo $this->info_ocba->OCBA_CODE; ?>"><?php echo $item; ?></a></li>
          <?php } ?>
            
        </ul>
    </div>
   <div id="">
   <h3 class="h_title">市町村情報<span style="float: right;"><!-- <a href="#" class="float-right" id="icon"></a> --></span></h3>
    <div class="content">
    <?php if($this->row != null){ ?>
        <div class="cc">
            <h2>
                <span class="id-cc"><?php echo $this->row->TOWN_CODE; ?></span>
                <span class="id-cc"><?php echo $this->row->TOWN_NAME; ?><?php if($this->row->TOWN_KANA != null){ echo "（".$this->row->TOWN_KANA."）"; } ?></span>
                <span class="float-right">
                <button href="index.php?top=page&option=com_frtown&task=detail&id=<?php echo $this->row->TOWN_CODE; ?>" style="margin-top: 3px;">市町村情報へ</button>  
                </span>
            </h2>
            <table style="width: 680px;" border="0">
                <tbody>
                    <tr>
                        <td style="width: 150px;vertical-align:top"><?php if($this->row->TOWN_POST!=null) echo '〒'.$this->row->TOWN_POST; ?></td>
                        <td colspan="2"><?php echo $this->row->TOWN_ADD1; echo "<br/>".$this->row->TOWN_ADD2;?></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>Tel：<?php echo $this->row->TOWN_TEL; ?></td>
                        <td style="width: 250px;">Fax：<?php echo $this->row->TOWN_FAX; ?></td>
                    </tr>
                    </tbody>
                    </table>
                    <hr/>
                    <table style="width: 680px;" border="0">
                        <tbody>
                    <tr>
                        <td style="width: 150px;">【URL】</td>
                        <td colspan="2"><a href="<?php echo $this->row->TOWN_URL; ?>"><?php echo $this->row->TOWN_URL; ?></a></td>
                    </tr>
                    <tr>
                        <td>【センター・クラブ】</td>
                        <td>
                            <?php foreach ($this->club_in_town as $value) {
                                if (substr($value->OCBA_CODE,0,1) == "0") {
                            ?>
                            <a href="index.php?top=page&option=com_frcenter&task=detail&id=<?php echo $value->OCBA_CODE; ?>"><?php echo $value->OCBA_NAME; ?></a>
                            <?php
                                }else{
                            ?>
                            <a href="index.php?top=page&option=com_frclub&task=detail&id=<?php echo $value->OCBA_CODE; ?>"><?php echo $value->OCBA_NAME; ?></a>
                            <?php
                                }
                            }?>
                        </td>
                    </tr>
                </tbody>
            </table>
            <input type="hidden" name="task" value=""/>
            <input type="hidden" name="boxchecked" value="0"/>
            
        </div>
        <?php 
        }else{ ?>
        <div>
            <p align="center">データは見つかりませんでした</p>
        </div>
    <?php } ?>
    </div>
 </div>                                
    
 </div>
 </form>
 <!-- END CONTENT -->
                           